package com.ruoyi.StarStudio.Service.Impl;

import com.ruoyi.StarStudio.Domain.Expert;
import com.ruoyi.StarStudio.Mapper.ExpertMapper;
import com.ruoyi.StarStudio.Service.ExpertService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExpertServiceImpl implements ExpertService {

    @Autowired
    ExpertMapper expertMapper;

    //查询全部专家信息
    @Override
    public List<Expert> findAll() {
        return expertMapper.findAll();
    }

    //根据专家id查询专家信息
    @Override
    public Expert findById(Integer id) {
        return expertMapper.findById(id);
    }

    //增加专家信息
    @Override
    public void add(Expert expert) {
        expertMapper.add(expert);
    }

    //修改专家信息
    @Override
    public void update(Expert expert) {
        expertMapper.update(expert);
    }

    //根据专家id删除专家信息
    @Override
    public void delete(Integer id) {
        expertMapper.delete(id);
    }

    @Override
    public List<Expert> getList(Expert expert) {
        return expertMapper.getList(expert);
    }
}
